import base from './base'
export default class index extends base {
  // 多维测评获取省份列表
  static province () {
    const url = this.urlMap.haijian + `/stuPartner/province`
    return this.get(url)
  }
  // 多维测评习题列表
  static questionList (openId) {
    const url = this.urlMap.zhangyong + `/v2/evaluationQuestion/questionList/${openId}`
    return this.get(url)
  }
  // 解析手机号
  static getPhone(wxCode, encryptedData, iv, sessionKey, openId) {
    const url = this.urlMap.zhouyu + '/phone.post'
    const param = {
      wxCode,
      encryptedData,
      iv,
      sessionKey,
      openId
    }
    return this.post(url, param)
  }
  // 提交用户测评情况
  static submitAnswer (answerJsonArray, openId) {
    let data = {
      answerJsonArray,
      openId
    }
    const url = this.urlMap.zhangyong + `/v2/evaluationQuestion/submitAnswer`
    return this.post(url, data)
  }
  // 延时函数
  static sleepTime(time) {
    return this.sleep(time)
  }
}
